package exprtree;

import visitor.Visitor;

public class DoubleLitExpr extends Expr {

	private double literal;

	/**
	 * DoubleLitExpr
	 * @param literal which is a primative double
	 */
	public DoubleLitExpr(double literal){
		this.setLiteral(literal);
	}

	/**
	 * setLiteral
	 * @param literal which is a primative double
	 */
	public void setLiteral(double literal) {
		this.literal = literal;
	}

	/**
	 * getLiteral
	 * @return a primative double
	 */
	public double getLiteral() {
		return literal;
	}

	/**
	 * accept
	 * @param visitor which is a Visitor object
	 * @return an Object
	 */
	public Object accept(Visitor visitor){
		return visitor.visit(this);
	}
}
